﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FollowMe.Infrastructure;


namespace FollowMe.Model
{
    public class Friend : IAggregateRoot
    {
        //making virtual enables lazy loading!
        public Member MemberAdding { get; internal set; }
        public Member FriendAdded { get; internal set; }

        [Key]
        [Column(Order = 1)]
        [Required]
        [ForeignKey("MemberAdding")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid MemberAddingID { get; internal set; }
       

        
        [Key]
        [Required]
        [ForeignKey("FriendAdded")]
        [Column(Order = 2)]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid FriendAddedID { get; internal set; }

        protected virtual void Dispose(Boolean dis)
        {
            if (dis)
            {

            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }
    }
}
